//
// Created by dxyinme on 2021/10/23.
//

#ifndef UXPNG_UTIL_H
#define UXPNG_UTIL_H

#include <png.h>
#include <cstdlib>
#include <cstdio>
#include <string>

namespace ux_png {

enum class PNG_DATA_TYPE {
  WRITE,
  READ
};

const size_t PNG_CHECK_LENGTH = 8;

bool IsPNG(const char * filename);

int ColorType2Channels(int color_type);

std::string ColorType2String(int color_type);

}

#endif //UXPNG_UTIL_H
